package FileIO;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 故我
 * Date: 2023-10-19
 * Time: 20:02
 */
public class IODemo7 {
    public static void main(String[] args) {
        //进行写文件 在try里面会自动关闭文件
        try (OutputStream outputStream = new FileOutputStream("e:/IO/test.txt")) {
            outputStream.write(96);
            outputStream.write(97);
            outputStream.write(99);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
